package com.ulic.customerManApplication.studentmodule.bo;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

import com.ulic.customerManApplication.commonmodule.bo.Organization;
import com.ulic.customerManApplication.usermodule.bo.User;

@Entity
@Table(name="T_GYW_STUDENT")
@SequenceGenerator(name="student_seq",sequenceName="S_GYW_STUDENT_ID")
public class Student implements Serializable{

	/**
	 * 学生信息
	 */
	private static final long serialVersionUID = 1L;
	private int id;//编号
	private String name;//学生姓名
    private String gender;//学生性别
    private String school;//学校
    private Date createDate;//创建日期
    
    private User user;//创建者
    
    private String subCompany;//所属机构
    
    private String subCity;//所属中支
    
	private String subComName;//分公司名称
	
	private String subCityName;//中支名称
	@Id
	@GeneratedValue(strategy=GenerationType.SEQUENCE,generator="student_seq")
    public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id; 
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getGender() {
		return gender;
	}
	public void setGender(String gender) {
		this.gender = gender;
	}
	public String getSchool() {
		return school;
	}
	public void setSchool(String school) {
		this.school = school;
	}
	public Date getCreateDate() {
		return createDate;
	}
	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}
	@ManyToOne(cascade = CascadeType.REFRESH, fetch = FetchType.LAZY, optional = false)   
    @JoinColumn(name="UM_USER_ID")
	public User getUser() {
		return user;
	}
	public void setUser(User user) {
		this.user = user;
	}
	public String getSubCompany() {
		return subCompany;
	}
	public void setSubCompany(String subCompany) {
		this.subCompany = subCompany;
	}
	public String getSubCity() {
		return subCity;
	}
	public void setSubCity(String subCity) {
		this.subCity = subCity;
	}
	public String getSubComName() {
		return subComName;
	}
	public void setSubComName(String subComName) {
		this.subComName = subComName;
	}
	public String getSubCityName() {
		return subCityName;
	}
	public void setSubCityName(String subCityName) {
		this.subCityName = subCityName;
	}
	
}
